package com.dxb.test.predicates;

import java.util.function.Predicate;
import java.util.stream.Stream;

/**
 * @author DLS
 */
public class 谓词 {
    public static void main(String[] args) {
        Predicate<Integer> predicate1 = t -> t > 0;
        Predicate<Integer> predicate2 = t -> t < 10;
        Stream.iterate(1, e -> e + 1).limit(100)
                .filter(predicate1)
                .filter(predicate2).forEach(System.out::println);

    }
}
